.editorContent {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.editorToolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background: #f9f9f9;
  border-bottom: 1px solid #e8e8e8;
}

.toolbarLeft, .toolbarRight {
  display: flex;
  align-items: center;
}

.completionToggle {
  margin-right: 12px;
  display: flex;
  align-items: center;
}

.languageSelector {
  width: 120px;
}

.refreshButton {
  cursor: pointer;
  color: #999;
  font-size: 16px;
  padding: 4px;
}

.refreshButton:hover {
  color: #1890ff;
  background: rgba(24, 144, 255, 0.1);
  border-radius: 4px;
}

.editorWrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* 加载状态样式 */
.loadingOverlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 10;
}

/* 代码编辑器自定义样式 */
.editorWrapper :global(.cm-editor) {
  height: 100%;
  background-color: #fff;
}

.editorWrapper :global(.cm-gutters) {
  background-color: #f9f9fb;
  border-right: 1px solid #e8e8ed;
  color: #999;
}

.editorWrapper :global(.cm-activeLineGutter) {
  background-color: #f5f5fa;
  color: #333;
}

.editorWrapper :global(.cm-activeLine) {
  background-color: rgba(245, 245, 250, 0.5);
}

.editorWrapper :global(.cm-content) {
  color: #333;
}

.editorWrapper :global(.cm-cursor) {
  border-left: 2px solid #5c9bd1;
}

.editorWrapper :global(.cm-selectionBackground) {
  background-color: rgba(92, 155, 209, 0.1);
}

.hiddenEditor {
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Monaco Editor tooltip样式修复 */
.editorWrapper :global(.monaco-editor) {
  overflow: visible !important;
}

.editorWrapper :global(.monaco-editor .monaco-editor-overlaymessage) {
  z-index: 1000 !important;
}

/* 确保tooltip有足够高的z-index，覆盖所有其他元素 */
.editorWrapper :global(.monaco-editor .monaco-hover) {
  z-index: 9999 !important;
  max-width: 400px !important;
  position: fixed !important;
}

/* 修复第一行错误信息被遮挡的问题 */
.editorWrapper :global(.monaco-editor .monaco-hover .monaco-hover-content) {
  max-height: 200px !important;
  overflow-y: auto !important;
  z-index: 9999 !important;
}

/* 确保tooltip容器也有最高优先级 */
.editorWrapper :global(.monaco-editor .monaco-hover .monaco-hover-row) {
  z-index: 9999 !important;
}

/* 修复tooltip的定位和显示 */
.editorWrapper :global(.monaco-editor .monaco-hover .monaco-hover-row .monaco-hover-content) {
  z-index: 9999 !important;
  position: relative !important;
}

/* 确保tooltip的箭头和边框也能正确显示 */
.editorWrapper :global(.monaco-editor .monaco-hover .monaco-hover-row .monaco-hover-content .monaco-hover-content-box) {
  z-index: 9999 !important;
}

/* 全局tooltip样式，确保覆盖所有元素 */
:global(.monaco-editor .monaco-hover) {
  z-index: 9999 !important;
  position: fixed !important;
}

:global(.monaco-editor .monaco-hover .monaco-hover-row) {
  z-index: 9999 !important;
}

:global(.monaco-editor .monaco-hover .monaco-hover-row .monaco-hover-content) {
  z-index: 9999 !important;
}

/* 确保tooltip不会被任何其他元素遮挡 */
:global(.monaco-editor .monaco-hover .monaco-hover-row .monaco-hover-content .monaco-hover-content-box) {
  z-index: 9999 !important;
  position: relative !important;
}

/* 修复可能的定位问题 */
:global(.monaco-editor .monaco-hover .monaco-hover-row .monaco-hover-content .monaco-hover-content-box .monaco-hover-content-box) {
  z-index: 9999 !important;
} 